package com.neusoft.mall.controller;

import com.neusoft.mall.model.Product;
import com.neusoft.mall.service.IProductService;
import com.neusoft.mall.service.impl.ProductServiceImpl;

import java.util.List;

public class ProductController {
    public IProductService service = new ProductServiceImpl();
    public List<Product> queryAll() {
        return service.queryAll();
    }

    public Product queryProById( Integer id ) {
        return service.queryProById(id);
    }

    public List<Product> queryProByName( String name ) {
        return service.queryProByName(name);
    }

    public Boolean delPro( Integer id ) {
        return service.delPro(id);
    }

    public void addPro( Product product ) {
        service.addPro(product);
    }
}
